package ptoVenta;

import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.InputStreamReader;
import java.net.Socket;
import java.sql.*;
import java.util.GregorianCalendar;
import javax.swing.JOptionPane;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author kirby joel del toro reyes
 */
public class ventas extends javax.swing.JFrame {

    private Socket clsCliente;
    private DataOutputStream salida;//dos;
    private DataInputStream entrada;//dis;
    static final int PUERTO = 5000;
    static final String HOST = "localhost";//"192.168.1.73"; 
    BufferedReader teclado = new BufferedReader(new InputStreamReader(System.in));
    String stPre = "";
    String stOp = "";
    String stCantidad = "";
    String stTotal = "";
    String stDinero = "";
    String stCambio = "";

    public ventas() {

        initComponents();
        clsReloj hilo = new clsReloj(jlbHora);
        hilo.start();
        fecha();
        validarCantidad();

        /*Calendar cal = Calendar.getInstance();
        String fecha = cal.get(cal.YEAR) + "/" + cal.get(cal.MONTH) + "/" + cal.get(cal.DATE);
        this.jlbFecha.setText(fecha);
        String hora = cal.get(cal.HOUR_OF_DAY) + ":" + cal.get(cal.MINUTE) + ":" + cal.get(cal.SECOND);
        this.jlbHora.setText(hora);*/

        setTitle("PUNTO DE VENTA 'PURIFICADORA DE AGUA'");
        //setExtendedState(ventas.MAXIMIZED_BOTH);
        setDefaultCloseOperation(ventas.EXIT_ON_CLOSE);
        setVisible(true);
        jtxCantidad.requestFocus();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jpCentral = new javax.swing.JPanel();
        jpPrecios = new javax.swing.JPanel();
        jlbOp1 = new javax.swing.JLabel();
        jlbOp2 = new javax.swing.JLabel();
        jlbOp3 = new javax.swing.JLabel();
        jlbPrecio = new javax.swing.JLabel();
        jlbCantidad = new javax.swing.JLabel();
        jtxCantidad = new javax.swing.JTextField();
        jbtTotal = new javax.swing.JButton();
        jlbTotal = new javax.swing.JLabel();
        jlbReciDine = new javax.swing.JLabel();
        jtxDinero = new javax.swing.JTextField();
        jbtCambio = new javax.swing.JButton();
        jlbCambio = new javax.swing.JLabel();
        jlbNueVent = new javax.swing.JLabel();
        jbtNueVent = new javax.swing.JButton();
        jbtTotalVentas = new javax.swing.JButton();
        jlbFecha = new javax.swing.JLabel();
        jlbHora = new javax.swing.JLabel();
        jntP6 = new javax.swing.JButton();
        jbtP10 = new javax.swing.JButton();
        jbtP50 = new javax.swing.JButton();
        jlbPrecios = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jpCentral.setBackground(new java.awt.Color(-8355712,true));

        jlbOp1.setText("GARRAFON RELLENABLE $6");

        jlbOp2.setText("GARRAFON RETORNABLE $10");

        jlbOp3.setText("GARRAFON NUEVO $50");

        jlbPrecio.setText("PRECIO $");

        jlbCantidad.setText("CANTIDAD: ");

        jbtTotal.setText("TOTAL");
        jbtTotal.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtTotalActionPerformed(evt);
            }
        });

        jlbReciDine.setText("RECIBO DINERO $");

        jbtCambio.setText("CAMBIO");
        jbtCambio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtCambioActionPerformed(evt);
            }
        });

        jlbNueVent.setText("NUEVA VENTA");

        jbtNueVent.setText("OK!");
        jbtNueVent.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtNueVentActionPerformed(evt);
            }
        });

        jbtTotalVentas.setText("TOTAL DE VENTAS");
        jbtTotalVentas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtTotalVentasActionPerformed(evt);
            }
        });

        jlbFecha.setText("FECHA");

        jlbHora.setText("HORA");

        jntP6.setText("$6");
        jntP6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jntP6ActionPerformed(evt);
            }
        });

        jbtP10.setText("$10");
        jbtP10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtP10ActionPerformed(evt);
            }
        });

        jbtP50.setText("$50");
        jbtP50.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtP50ActionPerformed(evt);
            }
        });

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {

            }
        ));
        jScrollPane1.setViewportView(jTable1);

        javax.swing.GroupLayout jpPreciosLayout = new javax.swing.GroupLayout(jpPrecios);
        jpPrecios.setLayout(jpPreciosLayout);
        jpPreciosLayout.setHorizontalGroup(
            jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpPreciosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 869, Short.MAX_VALUE)
                    .addGroup(jpPreciosLayout.createSequentialGroup()
                        .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jntP6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jlbFecha, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jlbOp1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jlbPrecio, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jbtTotal, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jlbReciDine, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jlbCantidad, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jbtCambio, javax.swing.GroupLayout.Alignment.LEADING))
                        .addGap(185, 185, 185)
                        .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jlbCambio, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                            .addComponent(jlbTotal, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                            .addComponent(jlbPrecios, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                            .addComponent(jtxDinero, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                            .addComponent(jtxCantidad, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                            .addComponent(jbtP10, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                            .addComponent(jlbOp2, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE))
                        .addGap(268, 268, 268)
                        .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpPreciosLayout.createSequentialGroup()
                                .addComponent(jlbNueVent)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jbtNueVent, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jbtTotalVentas, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                .addComponent(jbtP50, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jlbHora, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(jlbOp3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))
                .addContainerGap())
        );
        jpPreciosLayout.setVerticalGroup(
            jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpPreciosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(27, 27, 27)
                .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jlbFecha, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jlbHora, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(30, 30, 30)
                .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jlbOp1)
                    .addComponent(jlbOp3)
                    .addComponent(jlbOp2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jntP6)
                    .addComponent(jbtP50)
                    .addComponent(jbtP10))
                .addGap(38, 38, 38)
                .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jlbPrecio)
                        .addComponent(jbtNueVent)
                        .addComponent(jlbNueVent))
                    .addComponent(jlbPrecios, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jpPreciosLayout.createSequentialGroup()
                        .addGap(35, 35, 35)
                        .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jlbCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jtxCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(32, 32, 32)
                        .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jbtTotal)
                            .addComponent(jlbTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jlbReciDine)
                            .addComponent(jtxDinero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jpPreciosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jbtCambio)
                            .addComponent(jlbCambio, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addContainerGap(22, Short.MAX_VALUE))
                    .addGroup(jpPreciosLayout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbtTotalVentas)
                        .addContainerGap())))
        );

        javax.swing.GroupLayout jpCentralLayout = new javax.swing.GroupLayout(jpCentral);
        jpCentral.setLayout(jpCentralLayout);
        jpCentralLayout.setHorizontalGroup(
            jpCentralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpCentralLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jpPrecios, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jpCentralLayout.setVerticalGroup(
            jpCentralLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpCentralLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jpPrecios, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        getContentPane().add(jpCentral, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    public void fecha() {
        String fecha = Fecha();
        jlbFecha.setText(fecha);
    }

    public String nombre(int mes) {
        switch (mes) {
            case 1:
                return "02";
            case 2:
                return "03";
            case 3:
                return "03";
            case 4:
                return "04";
            case 5:
                return "05";
            case 6:
                return "06";
            case 7:
                return "07";
            case 8:
                return "08";
            case 9:
                return "09";
            case 10:
                return "10";
            case 11:
                return "11";
            case 12:
                return "12";

        }
        return "error";
    }

    public String Fecha() {
        GregorianCalendar fecha = new GregorianCalendar();
        int dia = fecha.get(fecha.DAY_OF_MONTH);
        int mes = fecha.get(fecha.MONTH);
        int año = fecha.get(fecha.YEAR);
        String miFecha = String.valueOf(año) + "/" + nombre(mes) + "/" + String.valueOf(dia);
        return miFecha;
    }

    public void validarCantidad() {
        try {

            //Para establecer el modelo al JTable
            DefaultTableModel modelo = new DefaultTableModel();
            this.jTable1.setModel(modelo);
            try (Connection Conexion = DriverManager.getConnection("jdbc:postgresql://localhost:5432/punto_venta", "postgres", "12345")) {
                Statement s = Conexion.createStatement();
                ResultSet rs = s.executeQuery("SELECT * from venta");
                //ResultSet rs = s.executeQuery("SELECT id_producto AS sobrante FROM venta WHERE cantidad_producto=0 group by id_producto");
                ResultSetMetaData rsMd = rs.getMetaData();
                //La cantidad de columnas que tiene la consulta
                int cantidadColumnas = rsMd.getColumnCount();
                //Establecer como cabezeras el nombre de las colimnas
                for (int i = 1; i <= cantidadColumnas; i++) {
                    modelo.addColumn(rsMd.getColumnLabel(i));
                }
                //Creando las filas para el JTable
                while (rs.next()) {
                    Object[] fila = new Object[cantidadColumnas];
                    for (int i = 0; i < cantidadColumnas; i++) {
                        fila[i] = rs.getObject(i + 1);
                    }
                    modelo.addRow(fila);
                }
                Thread.sleep(1000);
                rs.close();
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

private void jbtTotalActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtTotalActionPerformed
// TODO add your handling code here:
    stPre = jlbPrecios.getText();
    int inPrecio = Integer.parseInt(stPre);
    stCantidad = jtxCantidad.getText();
    int inCant = Integer.parseInt(stCantidad);
    int inTotal = inPrecio * inCant;
    stTotal = Integer.toString(inTotal);
    System.out.println("EL TOTAL ES " + stTotal);
    jlbTotal.setText(stTotal);
    jtxDinero.requestFocus();    
}//GEN-LAST:event_jbtTotalActionPerformed
private void jbtCambioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtCambioActionPerformed
    try {

        int inTotal = Integer.parseInt(stTotal);
        stDinero = jtxDinero.getText();
        int inDinero = Integer.parseInt(stDinero);
        int inCambio = 0;
        String id = "pro_001";
        //if (validarUsuario())        {
        if (inTotal <= inDinero) {
            clsCliente = new Socket(HOST, PUERTO);
            salida = new DataOutputStream(clsCliente.getOutputStream());
            entrada = new DataInputStream(clsCliente.getInputStream());

            int inPrecio = Integer.parseInt(stPre);
            if (inPrecio == 6) {
                stOp = "1";

            } else if (inPrecio == 10) {
                stOp = "2";

            } else if (inPrecio == 50) {
                stOp = "3";

            }
            salida.writeUTF(stOp);
            System.out.println("INGRESA LA CANTIDAD ");
            stCantidad = jtxCantidad.getText();
            salida.writeUTF(stCantidad);
            stTotal = entrada.readUTF();
            System.out.println("EL TOTAL ES " + stTotal);
            jlbTotal.setText(stTotal);

            entrada.close();
            salida.close();
            clsCliente.close();

            inCambio = inDinero - inTotal;
            stCambio = Integer.toString(inCambio);
            jlbCambio.setText(stCambio);
            /*} else {
            JOptionPane.showMessageDialog(null, "El nombre de usuario y/o contrasenia no son validos.");
            JOptionPane.showMessageDialog(null, jtfUsuario.getText() + " " + jtfContrasena.getText());
            }*/
        } else {
            JOptionPane.showMessageDialog(null, "El dinero: $" + jtxDinero.getText() + "Es menor que $" + jlbTotal.getText());
            jtxDinero.setText("");    //limpiar campos
            jtxDinero.requestFocusInWindow();
        }
    } catch (Exception e) {
        System.out.println(e.getMessage());
    }
}//GEN-LAST:event_jbtCambioActionPerformed
private void jbtNueVentActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtNueVentActionPerformed
// TODO add your handling code here:
    validarCantidad();
    Limpiar();
    jtxCantidad.requestFocus();
}//GEN-LAST:event_jbtNueVentActionPerformed

private void jbtTotalVentasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtTotalVentasActionPerformed
// TODO add your handling code here:
    setVisible(false);
    cuentas mod = new cuentas();
    mod.setLocationRelativeTo(null);
    mod.setVisible(true);
}//GEN-LAST:event_jbtTotalVentasActionPerformed

private void jntP6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jntP6ActionPerformed
// TODO add your handling code here:
    String stPrecio1 = "6";
    jlbPrecios.setText(stPrecio1);
    jtxCantidad.requestFocus();
}//GEN-LAST:event_jntP6ActionPerformed

private void jbtP10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtP10ActionPerformed
// TODO add your handling code here:
    String stPrecio2 = "10";
    jlbPrecios.setText(stPrecio2);
    jtxCantidad.requestFocus();
}//GEN-LAST:event_jbtP10ActionPerformed

private void jbtP50ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtP50ActionPerformed
// TODO add your handling code here:
    String stPrecio3 = "50";
    jlbPrecios.setText(stPrecio3);
    jtxCantidad.requestFocus();
}//GEN-LAST:event_jbtP50ActionPerformed

    public static void main(String arg[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;




                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(ventas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(ventas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(ventas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(ventas.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new ventas().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane jScrollPane1;
    public javax.swing.JTable jTable1;
    private javax.swing.JButton jbtCambio;
    private javax.swing.JButton jbtNueVent;
    private javax.swing.JButton jbtP10;
    private javax.swing.JButton jbtP50;
    private javax.swing.JButton jbtTotal;
    private javax.swing.JButton jbtTotalVentas;
    private javax.swing.JLabel jlbCambio;
    private javax.swing.JLabel jlbCantidad;
    private javax.swing.JLabel jlbFecha;
    private javax.swing.JLabel jlbHora;
    private javax.swing.JLabel jlbNueVent;
    private javax.swing.JLabel jlbOp1;
    private javax.swing.JLabel jlbOp2;
    private javax.swing.JLabel jlbOp3;
    private javax.swing.JLabel jlbPrecio;
    private javax.swing.JLabel jlbPrecios;
    private javax.swing.JLabel jlbReciDine;
    private javax.swing.JLabel jlbTotal;
    private javax.swing.JButton jntP6;
    private javax.swing.JPanel jpCentral;
    private javax.swing.JPanel jpPrecios;
    private javax.swing.JTextField jtxCantidad;
    private javax.swing.JTextField jtxDinero;
    // End of variables declaration//GEN-END:variables

    void Limpiar() {
        jtxCantidad.setText(null);
        jtxDinero.setText(null);
        jlbPrecios.setText(null);
        jlbTotal.setText(null);
        jlbCambio.setText(null);
    }
}
